<?php

/**
 * Erra_Fields_Hidden - Displays hidden field in a form
 *
 * @package
 * @author Alexis Eric
 * @copyright Copyright (c) 2012 - Erra Prod
 * @version $1.0$
 * @access public
 */
class Erra_Fields_Hidden extends Erra_Fields_Base_Field {

    function __construct($objectId) {
        parent::__construct($objectId);
    }

    /**
     * Erra_Fields_Hidden::editInstance() - Renders an <input type="hidden"> field
     *
     * @param mixed $lang
     * @return
     */
    public function editInstance(Array $extraProperties = null) {
        $res = '<input type="hidden" name="' . $this->getHtmlName() . '" id="' . $this->getHtmlId() . '" value="' . $this->getRawData() . '" ' . $this->getHtmlAttributes($extraProperties) . '/>';
        return $res;
    }

    function toHtml($displayParameters = null) {
        return $this->_rawData;
    }

}